

template<typename T> class Singleton
{
public:
	static T& Instance()
	{
		static T theSingleInstance;  // assumes T has a protected default constructor
		return theSingleInstance;
	}
};

class Globals : public Singleton<Globals>
{
	friend class Singleton<Globals>;
public:
	double CollisionTime;
	double DiffuseTime;
	double ReflectionTime;
	double RefractionTime;
protected: 
	Globals(): CollisionTime(0.0),DiffuseTime(0.0),ReflectionTime(0.0),RefractionTime(0.0) {}   // default constructor 
};
